package com.bbshop.service.product.impl;

import java.util.UUID;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bbshop.bean.product.Brand;
import com.bbshop.dao.product.BrandDAO;
import com.bbshop.service.base.impl.BaseServiceSupport;
import com.bbshop.service.product.BrandService;

@Service
public class BrandServiceImpl extends BaseServiceSupport<Brand> implements
		BrandService {
	
//	private BrandDAO dao;

	@Override
	public void save(Brand brand) {
		brand.setCode(UUID.randomUUID().toString());
		// System.out.println(brand.getCode());
		super.save(brand);
	}
	@Resource(type=BrandDAO.class)
	public void setDao(BrandDAO dao) {
		this.dao = dao;
	}
}
